﻿@using JustMVCTest.Models;
@using System.Collections.Generic;
@model JustMVCTest.Controllers.ReportController.Main_Vendor
           
<br />
<head>
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
</head>

<body>

Total PO's: @Model.HeadLine.CountPos


<div id="replogo">
@{
  var RelPathS = System.Configuration.ConfigurationManager.AppSettings["WebDirectory"].ToString();
  var RelPathE = "/JustMVCTest/pics/report.jpg";
  var RelPath = RelPathS + RelPathE;
}
<img src= "@RelPath" alt="Reportlogo" align="left" />
</div>
<!--<font align="center"><b><u>Late PO's</u></b></font>
<br /><br /> !-->
<table cellpadding="3" cellspacing="3">
    <tr border="1" bgcolor="#87CEFF" color="#ffffff">
        <td width="20%" align="center">
            PO Number
        </td>
        <td width="10%" align="center">
            Item
        </td>
        <td width="30%" align="center">
            Description
        </td>
         <td width="20%" align="center">
            Delivery Date
        </td>
           <td width="20%" align="center">
           Status
        </td>
    </tr>
    @{
        var OddColor = "#DDEEEE";
        var evenColor = "#EEFFFF";
        var Odd = OddColor;
    }
    @{ 
        var num_rows = 1;
        var first_time = true;
        
    }
    @foreach (JustMVCTest.Controllers.ReportController.Vendor_Res po in Model.Vendor_Res)
    {
        if (num_rows % 18 == 0 && !first_time)
        {
            <tr border="1" bgcolor="#87CEFF" color="#ffffff">
                <td width="20%" align="center">
                    PO Number
                </td>
                <td width="10%" align="center">
                    Item
                </td>
                <td width="30%" align="center">
                    Description
                </td>
                 <td width="20%" align="center">
                    Delivery Date
                </td>
                   <td width="20%" align="center">
                   Status
                </td>
            </tr>
        }
        else
        {
            <tr border="1" align="center" bgcolor="@Odd">
                <td>@po.PONumber
                </td>
                <td>@po.Item
                </td>
                <td>@po.Descr
                </td>
                 <td>@po.DeliveryDate
                </td>
                <td>@po.Status
                </td>
            </tr>
        }
        num_rows++;
        first_time = false;
        if (Odd == OddColor)
        {
            Odd = evenColor;
        }
        else
        {
            Odd = OddColor;
        }

    }
</table>

</body>